<!--
  ~ Copyright (c) 2020 the original author or authors
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  ~ or implied. See the License for the specific language governing
  ~ permissions and limitations under the License.
  -->

<div class="dialog" mat-dialog>
  <div mat-dialog-header class="dialog__header">
    <h1 mat-dialog-title class="dialog__header--title">{{ 'recovery.password_recovery' | translate }}</h1>
  </div>
  <form #form="ngForm" class="dialog__content">
    <div class="form-field">
      <label>{{ 'recovery.label' | translate }}</label>
      <input
        type="email"
        name="email"
        required
        email="true"
        [(ngModel)]="email"
        [ngModelOptions]="{ standalone: true }"
        placeholder="{{ 'common.email' | translate }}"
      />
    </div>
    <div class="dialog__actions">
      <button type="button" class="cancel-btn" mat-dialog-close>
        {{ 'common.capital.cancel' | translate | titlecase }}
      </button>
      <button type="submit" [mat-dialog-close]="email" class="save-btn" [disabled]="!form.valid">
        {{ 'common.capital.submit' | translate | titlecase }}
      </button>
    </div>
  </form>
  <button class="button-cross" mat-icon-button mat-dialog-close>
    <mat-icon svgIcon="cross_new" inline="true"></mat-icon>
  </button>
</div>
